package com.etc.entity;

import java.io.Serializable;

/**
 * @订单项[订单详情]的实体类
 * 
 * @author
 *
 */
public class Items implements Serializable {
	/**
	 * itemsid 订单项序号 主键 count (单个商品)数量 goodsid 商品id 外键 orderid 订单id 外键 cost
	 * 花费(数量X单价)
	 */
	private int itemsid;
	private int count;
	private int goodsid; //private Goods goods;
	private String orderid;
	private double cost;
	private int userid; //private Users user
	private int shopid; // private Shop shop
	
	private int shopcid;//购物车中对应的id，出现在这里目的是为了订单生产后，将对应的购物车记录删除。

	public int getUserid() {
		return userid;
	}

	public void setUserid(int userid) {
		this.userid = userid;
	}

	// 无参构造
	public Items() {
		// TODO Auto-generated constructor stub
	}

	/**
	 * 序号自增的带参构造
	 * 
	 * @param count
	 * @param goodsid
	 * @param orderid
	 * @param cost
	 */
	public Items(int count, int goodsid, String orderid, double cost) {
		super();
		this.count = count;
		this.goodsid = goodsid;
		this.orderid = orderid;
		this.cost = cost;
	}

	/**
	 * 带参构造
	 * 
	 * @param itemsid
	 * @param count
	 * @param goodid
	 * @param orderid
	 * @param cost
	 */
	public Items(int itemsid, int count, int goodsid, String orderid, double cost, int userid, int shopid) {
		super();
		this.itemsid = itemsid;
		this.count = count;
		this.goodsid = goodsid;
		this.orderid = orderid;
		this.cost = cost;
		this.userid = userid;
		this.shopid = shopid;
	}
	
	/**
	 * 
	 * @param count
	 * @param goodsid
	 * @param orderid
	 * @param cost
	 * @param userid
	 * @param shopid
	 */
	public Items(int count, int goodsid, String orderid, double cost, int userid, int shopid,int shopcid) {
		super();
		this.count = count;
		this.goodsid = goodsid;
		this.orderid = orderid;
		this.cost = cost;
		this.userid = userid;
		this.shopid = shopid;
		this.shopcid = shopcid;
	}

	/**
	 * @return the itemsid
	 */
	public int getItemsid() {
		return itemsid;
	}

	/**
	 * @param itemsid the itemsid to set
	 */
	public void setItemsid(int itemsid) {
		this.itemsid = itemsid;
	}

	/**
	 * @return the count
	 */
	public int getCount() {
		return count;
	}

	/**
	 * @param count the count to set
	 */
	public void setCount(int count) {
		this.count = count;
	}

	/**
	 * @return the goodid
	 */
	public int getGoodsid() {
		return goodsid;
	}

	/**
	 * @param goodid the goodid to set
	 */
	public void setGoodsid(int goodsid) {
		this.goodsid = goodsid;
	}

	/**
	 * @return the orderid
	 */
	public String getOrderid() {
		return orderid;
	}

	/**
	 * @param orderid the orderid to set
	 */
	public void setOrderid(String orderid) {
		this.orderid = orderid;
	}

	/**
	 * @return the cost
	 */
	public double getCost() {
		return cost;
	}

	/**
	 * @param cost the cost to set
	 */
	public void setCost(double cost) {
		this.cost = cost;
	}

	@Override
	public String toString() {
		return "订单项信息 [订单项序号=" + itemsid + ", 数量=" + count + ", 商品id=" + goodsid + ", 订单id=" + orderid + ", 花费=" + cost
				+ "]";
	}

	/**
	 * @return the shopid
	 */
	public int getShopid() {
		return shopid;
	}

	/**
	 * @param shopid the shopid to set
	 */
	public void setShopid(int shopid) {
		this.shopid = shopid;
	}

	/**
	 * @return the shopcid
	 */
	public int getShopcid() {
		return shopcid;
	}

	/**
	 * @param shopcid the shopcid to set
	 */
	public void setShopcid(int shopcid) {
		this.shopcid = shopcid;
	}

}
